package o;

import com.huawei.appgallery.foundation.card.base.bean.BaseLocalCardBean;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseDetailResponse;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;

public class chg extends chi {
    protected void ˊ(cia o_cia, chd o_chd, BaseDetailResponse baseDetailResponse) {
        int i = 0;
        BaseLocalCardBean baseLocalCardBean = null;
        while (i < o_cia.ॱˊ()) {
            CardBean ˎ;
            BaseLocalCardBean baseLocalCardBean2;
            chz ˏ = o_cia.ˏ(i);
            if (ˏ != null) {
                ˎ = ˏ.ˎ();
            } else {
                ˎ = null;
            }
            if (ˎ instanceof BaseLocalCardBean) {
                baseLocalCardBean2 = (BaseLocalCardBean) ˎ;
                if (baseLocalCardBean2.ˊ()) {
                    if (baseLocalCardBean != null) {
                        baseLocalCardBean.ˊ(true);
                        baseLocalCardBean2 = null;
                    } else {
                        baseLocalCardBean2 = baseLocalCardBean;
                    }
                }
            } else {
                baseLocalCardBean2 = baseLocalCardBean;
            }
            i++;
            baseLocalCardBean = baseLocalCardBean2;
        }
    }
}
